package com.tanhua.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.domain.Result;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface ResultMapper extends BaseMapper<Result> {
    @Select("SELECT * FROM tb_result WHERE #{totalScore}>min_score AND #{totalScore}<max_score AND questionnaire_id=#{questionnaireId};")
    Result getResultByScore(@Param("totalScore") Integer totalScore, @Param("questionnaireId") Long questionnaireId);
}
